<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <div onclick="test()">132465789</div>
</body>
</html>
<script>
  const Debounce = (fn, t) => {
    const delay = t || 500
    let timer
    return function() {
      const args = arguments
      if (timer) {
        clearTimeout(timer)
      }
      timer = setTimeout(() => {
        timer = null
        fn.apply(this, args)
      }, delay)
    }
  }

  function test() {
    console.log(fn)
  }

  let fn = Debounce(log, 1000)

  function log() {
    console.log(123456789)
  }
</script>